<?php


namespace app\index\validate;


use think\Validate;

class Stock extends Validate
{
    protected $rule = [
        ['pro_id','require|number','商品不能为空|商品id必须为数字'],
        ['cn_name','require','中文商品名不能为空'],
        ['en_name','require','英文商品名不能为空'],
        ['type','require|number','类型不能为空'],
        ['pur_price','require|number','单价不能为空|单价必须为数字'],
        ['selling_price','require|number','销售价格不能为空|销售价格必须为数字'],
        ['stock_out_amount','require|number','出库数量不能为空|出库数量必须为数字'],
    ];
    protected $scene = [
        'stock_out_invoice'  =>  ['pro_id','type','pur_price','stock_out_amount'],
    ];
}